﻿using BCCommon.TMS.Driver;
using BCEntity.TMS.LearningTrain.DriverLearningTrainRecord;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.TMS.LearningTrain.DriverLearningTrainRecord
{
    public interface IDriverLearningTrainRecordData
    {
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="driverLearningTrainRecordId"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(long driverLearningTrainRecordId);
        /// <summary>
        /// 获取
        /// </summary>
        /// <param name="driverLearningTrainRecordId"></param>
        /// <returns></returns>
        Task<DriverLearningTrainRecordEntity> GetEntityAsync(long driverLearningTrainRecordId);
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<DriverLearningTrainRecordEntity> InsertAsync(DriverLearningTrainRecordEntity entity);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        Task<DriverLearningTrainRecordEntity> UpdateAsync(DriverLearningTrainRecordEntity entity);

        /// <summary>
        /// 获取培训历史记录
        /// </summary>
        /// <param name="agentRecordId">代理商id</param>
        /// <param name="driverName">司机名称</param>
        /// <param name="driverRoleType">角色</param>
        /// <param name="vehicleNo">车牌号</param>
        /// <param name="phone">手机号</param>
        /// <param name="trainingSiteConfigId">培训点配置id</param>
        /// <param name="trainingStartDate">培训开始日期</param>
        /// <param name="trainingEndDate">培训结束日期</param>
        /// <param name="learnTrainPassedStartDate">培训通过开始日期</param>
        /// <param name="learnTrainPassedEndDate">培训通过结束日期</param>
        /// <param name="learnTrainSignEndDate">培训签到开始日期</param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="learnTrainSignStartDate">培训签到结束日期</param>
        /// <returns></returns>
        Task<(IEnumerable<DriverLearningTrainRecordViewEntity>, int)> GetListAsync(long agentRecordId, string driverName,
             DriverRoleType? driverRoleType, string vehicleNo, string phone, long? trainingSiteConfigId, DateTime? trainingStartDate,
             DateTime? trainingEndDate, DateTime? learnTrainPassedStartDate, DateTime? learnTrainPassedEndDate,
             DateTime? learnTrainSignStartDate, DateTime? learnTrainSignEndDate,
             int pageIndex, int pageSize);
    }
}